package com.gz.golfgame.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.gz.golfgame.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends Activity {


    @BindView(R.id.test_gif)
    ImageView testGif;
    @BindView(R.id.test_light)
    ImageView test_light;
    @BindView(R.id.index_text)
    ImageView index_text;
    @BindView(R.id.btn_next)
    Button btnNext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        Glide.with(this).load(R.drawable.homepage).into(testGif);
        Glide.with(this).load(R.drawable.light).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(test_light);
        Glide.with(this).load(R.drawable.index_text).asGif().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(index_text);

    }

    @OnClick(R.id.btn_next)
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_next:
                Intent intent = new Intent(MainActivity.this,ReadyActivity.class);
                startActivity(intent);
                break;
        }
    }
}
